package resolver

// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.

import (
	"context"
	"gqlt2/graph/generated"
	"gqlt2/graph/model"

	"github.com/dgryski/trifles/uuid"
)

func (r *mutationResolver) NewEnterpriseBlacklist(ctx context.Context, input model.NewEnterpriseBlacklistParam) (*model.BlacklistOperationRecord, error) {
	return &model.BlacklistOperationRecord{RecordID: uuid.UUIDv4()}, nil
}

func (r *mutationResolver) NewVehicleBlacklist(ctx context.Context, input model.NewVehicleBlacklistParam) (*model.BlacklistOperationRecord, error) {
	return &model.BlacklistOperationRecord{RecordID: uuid.UUIDv4()}, nil
}

func (r *mutationResolver) NewDriverBlacklist(ctx context.Context, input model.NewDriverBlacklistParam) (*model.BlacklistOperationRecord, error) {
	return &model.BlacklistOperationRecord{RecordID: uuid.UUIDv4()}, nil
}

func (r *mutationResolver) CancelEnterpriseBlacklist(ctx context.Context, input model.CancelEnterpriseBlacklistParam) (*model.BlacklistOperationRecord, error) {
	return &model.BlacklistOperationRecord{RecordID: uuid.UUIDv4()}, nil
}

func (r *mutationResolver) CancelVehicleBlacklist(ctx context.Context, input model.CancelVehicleBlacklistParam) (*model.BlacklistOperationRecord, error) {
	return &model.BlacklistOperationRecord{RecordID: uuid.UUIDv4()}, nil
}

func (r *mutationResolver) CancelDriverBlacklist(ctx context.Context, input model.CancelDriverBlacklistParam) (*model.BlacklistOperationRecord, error) {
	return &model.BlacklistOperationRecord{RecordID: uuid.UUIDv4()}, nil
}

func (r *queryResolver) BlacklistOperationRecordList(ctx context.Context, query model.BlacklistOperationRecordListQuery) (*model.BlacklistOperationRecordConnection, error) {
	return &model.BlacklistOperationRecordConnection{
		PageInfo: &model.PageInfo{Total: 100},
		Nodes: []*model.BlacklistOperationRecord{&model.BlacklistOperationRecord{
			RecordID: uuid.UUIDv4(),
		}},
	}, nil
}

// Mutation returns generated.MutationResolver implementation.
func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResolver{r} }

// Query returns generated.QueryResolver implementation.
func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }

type mutationResolver struct{ *Resolver }
type queryResolver struct{ *Resolver }
